while(<>) {
    s/[\s]*\n/\n/g;
    print;
}
